package com.xie.authority_system.dao;

import com.xie.authority_system.entity.Permission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
* @author XIEJINGCHENG
* @description 针对表【sys_permission(权限表)】的数据库操作Mapper
* @createDate 2024-01-08 14:45:18
* @Entity com.xie.authority_system.entity.Permission
*/
public interface PermissionMapper extends BaseMapper<Permission> {

    /**
     * 根据用户id来查询菜单列表
     * @param userId
     * @return
     */
    List<Permission> findPermissionListByUserId(Long userId);

    /**
     * 根据角色id来查询菜单列表
     * @param roleId
     * @return
     */
    List<Permission> findPermissionListByRoleId(Long roleId);
}
